import {Inject, Injectable} from '@nestjs/common'
import {UserService} from "@/modules/system/user/user.service";
import {User} from "@/modules/system/user/entities/user.entity";

@Injectable()
export class AuthService {
    constructor(
        @Inject(UserService)
        private readonly userService: UserService,
    ) {
    }

    async validateUser(payload: { id: number }): Promise<User> {
        return await this.userService.findOneById(payload.id)
    }
}
